Release 10.1A: OpenEdge Development:
.NET Open Clients


Defining the return type for a user-defined function

You must specify the return type for a user-defined function as part of setting up the parameters. You can set this return type using the ReturnType property of the Progress.Open4GL.Proxy.ParamArray object:

Syntax
public int ReturnType 

You must set this property to the class constant defined in Progress.Open4GL.Parameter that corresponds to the Progress 4GL data type returned by the user-defined function, as shown in Table 8–3.

Table 8–3: User-defined function return types for the OpenAPI 
Progress data type
Progress.Open4GL.Parameter
class constant
CHARACTER 
PRO_CHARACTER 
COM-HANDLE 
PRO_COMHANDLE  
DATE 
PRO_DATE 
DATETIME 
PRO_DATETIME 
DATETIME-TZ 
PRO_DATETIMETZ 
DECIMAL 
PRO_DECIMAL 
INTEGER 
PRO_INTEGER  
LOGICAL 
PRO_LOGICAL 
RAW 
PRO_RAW 
RECID 
PRO_RECID 
ROWID 
PRO_ROWID  
WIDGET-HANDLE  
PRO_WIDGETHANDLE 

Note: LONGCHAR, MEMPTR, TABLE, TABLE-HANDLE, DATASET, and DATASET-HANDLE cannot be return types of a user-defined function.

For example, to set the return type for a user-defined function to the 4GL INTEGER data type, you can set the ReturnType property on a ParamArray object, parms, as follows:

parms.ReturnType = Parameter.PRO_INTEGER; 


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095